package com.jt.controller;

import com.jt.service.UserService;
import com.jt.service.UserServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

//controller层只有类 不用写接口
@Controller
public class UserController {//key: userController

    @Autowired //按照类型 IOC 根据类型获取对象 对象如何赋值给属性???
    private UserService userService;

    public void addUser(){
        userService.addUser();
    }
}
